package com.tfjybj.itoo.exam.provider.service.impl;

import com.dmsdbj.itoo.tool.base.service.impl.BaseServicePlusImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tfjybj.itoo.exam.entity.BuildingEntity;
import com.tfjybj.itoo.exam.provider.dao.BuildingDao;
import com.tfjybj.itoo.exam.provider.service.BuildingService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * BuildingService接口实现类
 * ${base}表
 *
 * @author 杨江涛
 * @version 2.0.0
 * @since 2.0.0 2018-11-15 10:35:56
 */
@Service("buildingService")
public class BuildingServiceImpl extends BaseServicePlusImpl<BuildingDao, BuildingEntity> implements BuildingService {
	
	//region 模板生成

    @Resource
    private BuildingDao buildingDao;

	 @Override
    public PageInfo<BuildingEntity> queryByLikeName(String name, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(buildingDao.queryLikeName(name));
    }


    //endregion

    /* **********************************以下为非模板生成的内容********************************* */

    @Override
    public List<BuildingEntity> findBuilding() {
        return buildingDao.findBuilding();
    }


}
